<?

/**
 * PhpMailer Builder class
 * @package simplemailer
 * @author Alberto Pardo Saleme <apardo@gmail.com>
 * @update 22/08/2007 01:48:25 p.m.
 * Copyright (C) 2005 - AdVerit S.A. <www.adverit.com>
 */

class SimpleMailerBuilder
{
    function &build($method)
    {
        switch($method)
        {
            case 'mail':
                 require_once(dirname(__FILE__) ."/SimpleMailerMailFunction.php");
                 $engine = new SimpleMailerMailFunction();
                 break;
            case 'phpMailer':
                 require_once(dirname(__FILE__) ."/SimpleMailerPhpMailer.php");
                 $engine = new SimpleMailerPhpMailer();
                 break;
            case 'Swift':
                 require_once(dirname(__FILE__) ."/SimpleMailerSwift.php");
                 $engine = new SimpleMailerSwift();
                 break;
        }

        return $engine;
    }
}

?>
